// TypeScript file

function req_get(url:string, parma:Object, successCallback:Function, errorCallback:Function) {
    var request = new egret.HttpRequest();
    request.responseType = egret.HttpResponseType.TEXT;
    request.open(url, egret.HttpMethod.GET);
    request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    request.send();
    request.addEventListener(egret.Event.COMPLETE, (e) => {
        console.log("complete",e);

    }, this);
    request.addEventListener(egret.IOErrorEvent.IO_ERROR, (e) => {
        console.log("error",e);

    }, this);
    request.addEventListener(egret.ProgressEvent.PROGRESS, (e) => {
        console.log("progress",e);

    }, this);
}